package com.jj.controller;

import com.jj.service.DemoService;
import com.jj.service.DemoService02;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DemoController02 {

    @Autowired
    private DemoService02 demoService02;

    @Autowired
    private DemoService demoService;

    @RequestMapping("/demo03")
    public String demo03(){// 正例
        return demoService.demo03("你好？");
    }
    @RequestMapping("/demo02")
    public String demo02(){// 反例
        return demoService02.demo02("你好？");
    }

    @RequestMapping("/getInfo02")
    public String getInfo02(String name,int age){
        return "server1:getInfo:"+"name:"+name+",age:"+age;
    }
}
